<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>订单详情</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/detail.css" />
</head>
<body>
<div class="detail" <if condition="$state neq 3">style="padding-bottom:60px;"<else />style="padding-bottom:0px;"</if>>
<div class="state">
    <!--申请中-->
    <switch name="state">
        <case value="0">
            <div class="inner">
                <h2 style="padding-top:0;">申请中</h2>
                <span><img src="__PUBLIC__/Wx/img/icon27.png"/></span>
                <p>本商品为自提商品，<br/>社区店二次分拣，开心享受家乡美味！</p></div>
        </case>
        <case value="6">
            <div class="inner">
                <h2 style="padding-top:0;">申请失败<i><if condition=" $population lt 8">(未在规定时间内完成集赞)<else/>(未在能成为前三的用户)</if></i></h2>
                <span><img src="__PUBLIC__/Wx/img/icon32.png"/></span>
                <p>本商品为自提商品，<br/>社区店二次分拣，开心享受家乡美味！</p>
            </div>
        </case>
        <case value="1">
            <!--申请成功-->
            <div class="inner">
                <h2 style="padding-top:0;">申请成功</h2>
                <span><img src="__PUBLIC__/Wx/img/icon33.png"/></span>
                <p>本商品为自提商品，<br/>社区店二次分拣，开心享受家乡美味！</p>
            </div>
        </case>
        <case value="2">
            <!--已发货-->
            <div class="inner">
                <h2 style="padding-top:0;">已发货</h2>
                <span><img src="__PUBLIC__/Wx/img/icon07.png"/></span>
                <p>本商品为自提商品，<br/>社区店二次分拣，开心享受家乡美味！</p>
            </div>
        </case>
        <case value="3">
            <!--待核销-->
            <div class="inner">
                <h2 style="padding-top:0;">待核销</h2>
                <!--<div class="time-item">还剩<strong id="hour_show"><s id="h"></s>0</strong>：<strong id="minute_show"><s></s>00</strong>：<strong id="second_show"><s></s>00</strong>分钟自动确认收货</div>-->
                <span><img src="__PUBLIC__/Wx/img/icon21.png"/></span>
                <p>本商品为自提商品，<br/>社区店二次分拣，开心享受家乡美味！</p>
            </div>
        </case>
        <case value="4">
            <!--待评价-->
            <div class="inner">
                <h2 style="padding-top:0;">交易成功</h2>
                <span><img src="__PUBLIC__/Wx/img/icon08.png"/></span>
                <p>本商品为自提商品，<br/>社区店二次分拣，开心享受家乡美味！</p>
            </div>
        </case>
        <case value="5">
            <!--待评价-->
            <div class="inner">
                <h2 style="padding-top:0;">已评价</h2>
                <span><img src="__PUBLIC__/Wx/img/icon08.png"/></span>
                <p>本商品为自提商品，<br/>社区店二次分拣，开心享受家乡美味！</p>
            </div>
        </case>
    </switch>
</div>
<div class="prolist">
    <div class="pro" onclick="window.location.href='__MODULE__/Foretaste/pro/gid/{$goods['id']}'">
        <div class="pic"><img src="<?= isMorePic($goods['h_imgs'])?>"/></div>
        <div class="name">
            <h2><b class="sc"><?=getunit($goods['category'])?></b>{$goods.title} {$goods.u_num}<?=getunit($goods['unit'])?></h2>
            <h5>{$goods.type_name}</h5>
            <del>原价￥{$goods.market}</del>
            <h4><span>{$goods.price}积分即可试吃</span><i>{$goods.sumorder}人已免费试吃</i></h4>
        </div>
    </div>
    <!--<div class="note">本产品为自提商品，社区二次分拣，开心享受美味</div>-->
</div>
<if condition="$state neq 5">
    <div class="ordermess">
        <p>创建时间：<?=date("Y-m-d H:i:s",$addtime)?></p>
    </div>
</if>
<!--申请中-->
<in name="state" value="0,1,2,6">
    <div class="people">
        <h2>已获得<span>{$population}</span>人点赞 <if condition=" $population lt $goods['praise_num']">，还差<span><?=$goods['praise_num']-$population>0?$goods['praise_num']-$population:0 ?></span>人完成集赞 <else />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;集赞用时<span>{$str_time}</span></if> </h2>
        <div class="list">
            <ul>
                <volist name="log" id="vo">
                    <li>
                        <div class="pic"><img src="{$vo.avatar}"/></div><h3>{$vo.nickname}</h3>
                    </li>
                </volist>
                <!--<li>-->
                <!--<div class="pic"><img src="images/pic08.jpg"/></div><h3>李晓慧</h3>-->
                <!--</li>-->
            </ul>
        </div>
    </div>
</in>

<in name="state" value="0,1,2,6">
    <div class="note03">
        <p>集赞试吃成功，就有机会当选社区扶贫大使</p>
        <p><b>享恩施免费3日游！</b></p>
    </div>
</in>


<switch name="state">
    <case value="0">
        <div class="time02">
            还剩<div class="time-item"><strong id="hour_show"><s id="h"></s>0</strong>时<strong id="minute_show"><s></s>00</strong>分<strong id="second_show"><s></s>00</strong>秒</div>结束，快来帮我集赞吧！
        </div>
    </case>
    <!--<case value="7">-->
        <!--<div class="note04">-->
            <!--<p>提交试吃申请后，24小时内<br/>最快邀请8名好友完成点赞的前三名用户，可获得试吃机会</p>-->
        <!--</div>-->
    <!--</case>-->
    <case value="1">
        <div class="note04">
            <p>同一批次试吃产品申请结束统一发货，<br>收到通知（短信、微信、电话）请到自提店自提</p>
        </div>
    </case>
    <case value="4">
        <div class="note03">
            <p>发布试吃评论，当选社区扶贫大使，<b>享恩施免费3日游！</b></p>
        </div>
    </case>
</switch>

<!--待核销-->
<in name="state" value="3">
    <div class="place">
        <p>取货店铺<span><?=$store['storename']?$store['storename']:'----------';?></span></p>
        <p>取货地址<span><?=$store['address']?$store['address']:'----------';?></span></p>
    </div>
    <!--待核销状态-->
    <if condition="$state eq 3">
        <div class="code">
            <h2>取货凭证<b>扫码进行核销</b></h2>
            <div class="pic">
                <h3><img src="__PUBLIC__/Foretaste/{$qrcode}"/></h3>
                <p><span>取货码：{$order_sn}</span>(<b>未核销</b>)</p>
            </div>
        </div>
    </if>
</in>
<!--已评价-->
<if condition="$state eq 5">
    <!--已评价-->
    <div class="comment">
        <ul>
            <li>
                <div class="top">
                    <div class="pic"><img src="{$m_info.avatar}"/></div>
                    <h3>{$m_info.nickname}</h3><b>{$m_info.hometown}</b><time>{$e_info.addtime|date="Y-m-d",###}</time>
                </div>
                <div class="wz">
                    <p>{$e_info.content}</p>
                    <p>
                        <volist name="e_info.pic" id="v">
                            <if condition="empty($v) neq true">
                                <img src="{$v}" />
                            </if>
                        </volist>
                    </p>
                </div>
                <div class="number"><span class="zan"><?=$e_info['like_num']?></span></div>
            </li>
        </ul>
    </div>
    <div class="voice">
        <h2>全部评论(<b>{$count}</b>) <div style="float:right;padding-right: 10px"><a href="http://www.xiangtws.com/index.php/Wx/ForetasteEvaluate/commentdetail/e_id/{$e_info['id']}">查看更多</a></div></h2>
        <ul>
            <volist name="comment" id="vo" offset="0" length="3">
                <li>
                    <div class="pic"><img src="{$vo.avatar}"/></div>
                    <div class="matter">
                        <h3>
                            <span>{$vo.nickname}</span><b>{$vo.hometown}</b>
                            <em class="praise" data-id="{$vo.id}" data-table="evaluate_comment">{$vo.like_num}</em>
                        </h3>
                        <p>{$vo.content}</p>
                        <h4><time>{$vo.addtime|date="Y-m-d",###}</time></h4>
                    </div>
                </li>
            </volist>
        </ul>
    </div>
    <!--<div class="link04"><a href="http://www.xiangtws.com/index.php/Wx/ForetasteEvaluate/commentdetail/e_id/{$e_info['id']}">查看更多</a></div>-->
    <div class="link04"><a href="__MODULE__/Foretaste/helppoor">查看当选扶贫大使免费恩施3日游</a></div>
</if>
<switch name="state">
    <case value="0">
        <!--申请中-->
        <div class="button"><input type="button" value="分享好友帮忙集赞" onClick="window.location='__MODULE__/Foretaste/foretaster/oid/{$id}'"/></div>
    </case>
    <!--<case value="7">-->
        <!--&lt;!&ndash;申请中&ndash;&gt;-->
        <!--<div class="button"><input type="button" value="查看订单" onClick="window.location='__MODULE__/Foretaste/foretaster/oid/{$id}'"/></div>-->
    <!--</case>-->
    <case value="6">
        <!--申请失败-->
        <div class="button"><input type="button" value="再次参加试吃申请" onClick="window.location='__MODULE__/Foretaste/index'"/></div>
    </case>
    <case value="1">
        <!--已成功-->
        <if condition="!$store and !$recommend">
            <div class="button"><input type="submit" value="推荐周边的店铺，收货更方便快捷！" onclick="window.location.href='__MODULE__/Recommend/index'"/></div>
            <else />
            <div class="button"><input type="submit" value="已推荐店铺，等待发货" style="background-color: #cccccc"/></div>
        </if>
    </case>
    <case value="4">
        <!--待评价-->
        <div class="button"><input type="button" value="立即发布试吃评论" onClick="window.location='__MODULE__/ForetasteOrder/addEva/oid/{$id}'"/></div>
    </case>
    <case value="5">
        <!--已评价-->
        <div class="button share_eva"><input type="button" value="分享好友点赞，有机会享恩施免费3日游"/></div>
    </case>
</switch>
</div>
<div class="page02">
    <div class="guide">
        <div class="pic"><img src="__PUBLIC__/Wx/img/share.png"/></div>
        <p>点击右上角，分享给朋友</p>
        <h5>邀请朋友来帮忙点赞！！！</h5>
        <h6><input type="button" value="我知道了" class="know"/></h6>
    </div>
</div>
<!--引用悬浮公共导航文件-->
<include file="Public:nav" />
<script  src="__PUBLIC__/Wx/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
    (function($){
        $(function(){
            var $Width = $('.people .list ul').width()/5.3;
            var len = $(".people .list ul li").length;
            //	alert(len);
            $('.people .list ul li').css({'width':$Width});
            $('.people .list ul').css({'width':$Width*len});
        })
    })(jQuery)
</script>
<script type="text/javascript">
    $('.share_eva').click(function(){
        $('.page02').css('display','block')
    });
    $('.know').click(function(){
        $('.page02').css('display','none')
    });
    $(".click span").click(function(){
        if($(this).text() ==="导航"){
            $(this).text("收起");
            $('.link02').css('display','block')
        }else{
            $(this).text("导航");
            $('.link02').css('display','none')
        }//end if
    });//end fun
</script>
<script type="text/javascript">
    var intDiff = parseInt("<?=$goods['endtime']-time()?>");//倒计时总秒数量

    function timer(intDiff){
        window.setInterval(function(){
            var day=0,
                hour=00,
                minute=0,
                second=0;//时间默认值
            if(intDiff > 0){
                day = Math.floor(intDiff / (60 * 60 * 24));
                hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
            }
            if (minute <= 9) minute = '0' + minute;
            if (second <= 9) second = '0' + second;
            $('#day_show').html(day);
            $('#hour_show').html('<s id="h"></s>'+hour+'');
            $('#minute_show').html('<s></s>'+minute+'');
            $('#second_show').html('<s></s>'+second+'');
            intDiff--;
        }, 1000);
    }
    $(function(){
        timer(intDiff);
    });
</script>
<include file="Public/wxshare" url="http://www.xiangtws.com/index.php/Wx/ForetasteOrder/order/oid/{$id}" title="{$e_info['goodstitle']}" desc="来乡土味士，吃天然菜，评选扶贫大使！" imgurl="{$m_info.avatar}" />
</body>
</html>